static_lib=libmymath.a
dy_lib = libmymethod.so

.PHNOY:all
all:$(dy_lib) $(static_lib)

$(dy_lib):mylog.o myprint.o
	gcc -shared -o $@ $^

mylog.o:mylog.c
	gcc -fPIC -c $^

myprint.o:myprint.c
	gcc -fPIC -c $^

$(static_lib):mymath.o
	ar -rc $@ $^

mymath.o:mymath.c
	gcc -c $^

.PHNOY:clean
clean:
	rm -rf *.o *.a *.so mylib 

.PHNOY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.h mylib/include
	cp *.a mylib/lib
	cp *.so mylib/lib 
